package org.joyflow.core.instance;


import cn.hutool.extra.spring.SpringUtil;
import org.joyflow.core.entity.DbConType;
import org.joyflow.core.service.SpringDbService;

import java.util.ArrayList;
import java.util.List;

public class DbConTypeRegistry {
    private static final DbConTypeRegistry instance = new DbConTypeRegistry();
    private static List<DbConType> types= new ArrayList<>();

    private DbConTypeRegistry() {

    }

    public static DbConTypeRegistry instance() {
        return instance;
    }

	public static void init() {
		SpringDbService dbService = SpringUtil.getBean(SpringDbService.class);
        types = dbService.getDatabaseConTypes();
	}

    public List<DbConType> getTypes() {
        return types;
    }



}
